package com.guli.mall.pms.config;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/*
 * @Author 罗
 * @date 2020/9/18 - 8:26 下午
 */
@ConfigurationProperties(prefix = "alibaba.cloud")
@Slf4j
@Data
public class MyAliOssProperties implements InitializingBean {

    private String accessKey;

    private String secretKey;

    @Value("${alibaba.cloud.oss.endpoint}")
    private String endpoint;

    @Override
    public void afterPropertiesSet() throws Exception {
        log.info("阿里云OSS参数加载完成"+endpoint);
    }
}
